[pull] master from DataDog:master#536
Merged
Merged
Conversation
* Change fetch_audit_logs to accept multiple file paths auditreduce natively accepts multiple files and merges them chronologically, so accept list[str] and join paths in the command. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Restructure collect_data_from_files for batched processing Replace the per-file subprocess loop with a two-phase approach: 1. Filter phase: collect valid file paths (skip missing/out-of-range/ already-processed files) 2. Single fetch: call fetch_audit_logs once with all valid paths This fixes the file_index bug where skipped files incremented the index causing incorrect time filters on subsequent files, and reduces the TOCTOU window for not_terminated files rotating before being reached. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Modernize type annotations in check.py Remove typing.List/Tuple imports, use built-in lowercase types. Update collect_relevant_files and get_previous_iteration_log_cursor return types to modern syntax. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Clean up inline comments in check.py Remove verbose inline comments per coding guidelines. Code is self-explanatory through descriptive variable and method names. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * changelog * implement feedback * adjust cursor structure for batching * address review feedback - fetch_audit_logs: return output, error on the exception path and guard finally so a Popen failure does not raise UnboundLocalError; terminate with a wait+kill fallback so children cannot outlive the check - drop shell=True in favour of argv lists to avoid path injection - log a debug line when collect_data_from_files has no valid paths - add missing @pytest.mark.unit markers - cover crash_recovery before-cutoff branch and clean-resume same-second scenario - reword first changelog entry to action-tense * fix mid-ingestion cursor bug --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…eline (#23687) * Restore legacy datadog_checks_dev jmx_metrics file to fix release pipeline PR #23652 deleted datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/jmx_metrics.py when migrating the command to ddev. The most recent in-toto tag link (.in-toto/tag.4e75cfa1.link) still lists this file as a product, so the wheels-builder materials assertion in record_materials.py fails the build. Restore the file with its original byte-identical content so the in-toto check passes. The file stays unregistered in the validate group, so ddev keeps owning the `validate jmx-metrics` command. The file can be removed again once the next datadog_checks_dev release rotates the tag link. * Restore validate group __init__ and add changelog entry The validate group's __init__.py is also recorded in tag.4e75cfa1.link with the pre-#23652 hash, so the in-toto chain verification would fail without restoring its content too. The re-registered command is dead code: ddev keeps owning `validate jmx-metrics`.
Splits the single-file `ddev/utils/github_async.py` into a package with the client and HTTP-shape primitives in `client.py` and one model per submodule under `models/`. Both `__init__.py` files use PEP 562 module-level `__getattr__` so importing one symbol only loads the submodule that defines it -- in particular `from ddev.utils.github_async.models import PullRequest` does not pull in the workflow or comment models. Adds two new endpoints used by upcoming work: - `AsyncGitHubClient.create_pull_request(owner, repo, title, head, base, body, draft)` - `AsyncGitHubClient.add_labels_to_issue(owner, repo, issue_number, labels)` Expands the `PullRequest` model with the typical fields callers need (id, state, draft, title, body, user, assignees, requested_reviewers, labels, created_at/updated_at/closed_at/merged_at, head, base) plus three small sub-models (`GitHubUser`, `Label`, `PullRequestRef`). Only `number` and `html_url` are required; the rest default to None/[] so partial payloads parse fine and `extra='ignore'` keeps the schema forward-compatible. Adds `FakeAsyncGitHubClient` and the `fake_async_github` pytest fixture in `tests/helpers/github_async.py`. The fake records every call and offers `mock_response(method, response, /, *, once=False, **match_kwargs)` for stubbing replies. Responses can be `BaseException` instances (raised), `GitHubResponse` instances (passed through), or inner data (auto-wrapped). `once=True` adds to a per-method FIFO queue so tests can model retry sequences. Sticky mocks (no `once`) match the most-recent registration. `assert_called_with` / `assert_called_once_with` perform strict-equality checks on kwargs; `assert_all_responses_consumed()` asserts the one-shot queue was drained.
* Add ddev release port-commit command * Lowercase port branch name and clean up step output * Improve port-commit output: split steps, lighter styling, completion panel, commit link in PR body
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )